import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import CertifiedReferee from './views/nav1/CertifiedReferee.vue'
import Editcaipanyuan from './views/nav1/Editcaipanyuan.vue'
import Examine from './views/nav1/Examine.vue'
import AddRe from './views/nav1/AddRe.vue'
import AddForm from './views/nav1/AddForm.vue'
import CreateEvents from './views/nav2/CreateEvents.vue'
import EditMatch from './views/nav2/editMatch.vue'
import EditEvents from './views/nav2/EditEvents.vue'
import Page4 from './views/nav2/Page4.vue'
import EventManagement from './views/nav2/EventManagement.vue'
import Page6 from './views/nav3/Page6.vue'
import RePosition from './views/nav3/RePosition.vue'
import GameLevel from './views/nav3/GameLevel.vue'
import ReLevel from './views/nav3/ReLevel.vue'
import ReOrgList from './views/nav3/ReOrgList.vue'
import echarts from './views/charts/echarts.vue'

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/logout',
        component: Login,
        name: 'logout',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '裁判员管理',
        redirect: '/certifiedReferee',
        iconCls: 'fa fa-users fa-fw',//图标样式class
        children: [
            { 
                path: '/certifiedReferee', 
                component: CertifiedReferee, 
                name: '已认证裁判员', 
                meta:{
                    requireAuth: true
                } 
            },
            { 
                path: '/editcaipanyuan', 
                component: Editcaipanyuan, 
                name: '编辑裁判员',
                meta:{
                    requireAuth: true
                },
                hidden: true 
            },
            { 
                path: '/examine', 
                component: Examine, 
                name: '待认证',
                meta:{
                    requireAuth: true
                },
            },
            { 
                path: '/addre', 
                component: AddRe, 
                name: '添加裁判员',
                meta:{
                    requireAuth: true
                },
             },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '赛事管理',
        iconCls: 'fa fa-trophy fa-fw',
        children: [
            // { path: '/page4', component: Page4, name: '赛事业务流' },
            { 
                path: '/eventManagement', 
                component: EventManagement, 
                name: '比赛管理',
                meta:{
                    requireAuth: true
                }, 
            },
            { 
                path: '/createEvents', 
                component: CreateEvents, 
                name: '创建赛事',
                meta:{
                    requireAuth: true
                },
            },
            { 
                path: '/editEvents', 
                component: EditEvents, 
                name: '编辑赛事',
                meta:{
                    requireAuth: true
                },
                hidden: true
            },
            { 
                path: '/editMatch', 
                component: EditMatch, 
                name: '查看赛事',
                meta:{
                    requireAuth: true
                },
                hidden: true 
            },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '学习园地管理（二期规划）',
        iconCls: 'fa fa-id-card-o fa-fw',
        children: [
            // { path: '/page4', component: Page4, name: '页面4' },
            // { path: '/page5', component: Page5, name: '页面5' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'fa fa-cog fa-fw',
        // leaf: true,//只有一个节点（只有一级菜单）
        children: [
            { 
                path: '/reorglist', 
                component: ReOrgList, 
                name: '机构管理',
                meta:{
                    requireAuth: true
                },
            },
            { 
                path: '/relevel', 
                component: ReLevel, 
                name: '裁判员级别',
                meta:{
                    requireAuth: true
                },
             },
            { 
                path: '/gameleve', 
                component: GameLevel, 
                name: '赛事级别',
                meta:{
                    requireAuth: true
                },
             },
            { 
                path: '/reposition', 
                component: RePosition, 
                name: '裁判员职务管理',
                meta:{
                    requireAuth: true
                },
             },
            
        ]
    },
    // {
    //     path: '/',
    //     component: Home,
    //     name: 'Charts',
    //     iconCls: 'fa fa-bar-chart',
    //     children: [
    //         { path: '/echarts', component: echarts, name: 'echarts' }
    //     ]
    // },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;